//
//  JGHelper.m
//  JGExpandTableDemo2
//
//  Created by mac on 15/9/21.
//  Copyright (c) 2015年 Free. All rights reserved.
//

#import "JGHelper.h"

@implementation JGHelper

+ (UILabel *)commonLabelWithFrame:(CGRect)frame font:(UIFont*)font textColor:(UIColor*)color lineBreakMode:(NSLineBreakMode)lineBreakMode {
    UILabel *label = [[UILabel alloc] initWithFrame:frame];
    label.textColor = color;
    label.font = font;
    label.backgroundColor = [UIColor clearColor];
    label.lineBreakMode = lineBreakMode;
    return label;
}

+ (UIImageView *)commomImageViewWithFrame:(CGRect)frame image:(UIImage*)image {
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:frame];
    imageView.image = image;
    return imageView;
}

+ (UIButton*)commomButtonWithFrame:(CGRect)frame title:(NSString*)title titleColor:(UIColor*)color titleFont:(UIFont*)font bgImage:(UIImage*)bgImage image:(UIImage*)image {
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = frame;
    button.titleLabel.font = font;
    [button setTitleColor:color forState:UIControlStateNormal];
    [button setTitle:title forState:UIControlStateNormal];
    [button setBackgroundImage:bgImage forState:UIControlStateNormal];
    [button setImage:image forState:UIControlStateNormal];
    return button;
}

@end
